class Solution {
public:
    int getSum(int a, int b) {
        
        
        int sum = a^b,ret = a&b;
        while(ret!=0)
        {
            ret <<= 1;
            int new_sum = sum;//保存之前的sum
            sum ^=ret;
            ret &=new_sum;
            
            
        }
        return sum;
    }
};